<?php
header("Content-type: text/html; charset=UTF-8;");
//header("Content-type: text/css; charset=UTF-8;");
//header("Content-type: text/css;");

include_once("class_suffixArray.php");

$suffix_array=new SuffixArray();

$chaine1="abcabc";
$chaine2="abcabc";

/*
$chaine1="[Doc[T1][P][P][P][T2][P][P]]";
$chaine2="[Doc[T1][P][P][T2][P][P]]";
$chaine3="[Doc[T1][P][P][P][T2][P][P][P][P]]";
*/

/*
$chaine1="[bloc]";
$chaine2="[bloc]";
$chaine3="[bloc]";
$chaine4="[bloc]";
$chaine5="[bloc]";
$chaine6="[bloc]";
$chaine7="[bloc]";
$chaine8="[bloc]";
$chaine9="[bloc]";
$chaine10="[bloc]";
$chaine11="[bloc]";
*/

$suffix_array->addString($chaine1);
$suffix_array->addString($chaine2);
print_r($suffix_array);
/*
$suffix_array->addString($chaine2);
$suffix_array->addString($chaine3);
$suffix_array->addString($chaine4);
$suffix_array->addString($chaine5);
$suffix_array->addString($chaine6);
$suffix_array->addString($chaine7);
$suffix_array->addString($chaine8);
$suffix_array->addString($chaine9);
$suffix_array->addString($chaine10);
$suffix_array->addString($chaine11);
*/
$srstr=$suffix_array->searchRepeatedStrings();

/*
print_r("<pre>");
print_r($srstr);
print_r("</pre>");
*/
$suffix_array->printSubstringArray($srstr,true);


?>
